<div id="material-detail" class="material-detail-widget">
  <div class="page-header clearfix">
    <h1 class="pull-left">{{'资源详情'|trans}}</h1>
  </div>
  <div class="content">
    <ul class="nav nav-tabs">
      <li role="presentation" class="active js-info" data-target="#info-tab">
        <a href="javascript:;">{{'基本信息'|trans}}</a>
      </li>
    </ul>
    <div class="tab-content">
      <div class="tab-pane active" id="info-tab">
        {% if app.user.id == material.createdUserId %}
          {% include 'MaterialLibBundle:Web:edit-detail-form.html.twig' %}
        {% else %}
          {% include 'MaterialLibBundle:Web:file-detail-static.html.twig' %}
        {% endif %}
      </div>

      {% if material.type == 'video' %}
        <div class="tab-pane" id="cover-tab">
          {% if material.processStatus|default('none') == 'ok' %}
          <form class="form-horizontal" id="cover-form">
            <div class="form-group">
              <label for="name" class="col-md-2 control-label">{{'封面'|trans}}</label>
              <div class="col-md-4">
                <img class="js-cover-img" src="{{ asset(material.thumbnail|default('assets/img/default/cloud_' ~ material.type ~ '.png')) }}">
              </div>
            </div>
          </form>
          {% else %}
            <div class="empty text-muted">
              {{'视频还没有转码完成，请等待转码完成......'|trans}}
            </div>
          {% endif %}
        </div>
      {% endif %}

    </div>
  </div>
</div>
